﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace PeteBrown.ConferenceTrivia.Controls
{
    public partial class Tombstone : UserControl
    {
        static Random _random = new Random();


        public Tombstone()
        {
            InitializeComponent();

            Loaded += new RoutedEventHandler(Tombstone_Loaded);

            
        }

        void Tombstone_Loaded(object sender, RoutedEventArgs e)
        {
            // random delay

            Storyboard sb = Resources["ShakeAndAppear"] as Storyboard;

            sb.BeginTime = TimeSpan.FromSeconds((double)_random.Next(0, 10000)/1000.0);

            sb.Begin();

        }
    }
}
